package com.ssd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ssd.entity.PolicyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface PolicyDao extends BaseMapper<PolicyEntity> {


    @Select("<script>" +
            "SELECT * " +
            "FROM tb_policy " +
            "</script>")
    @Results({
            @Result(property="policyId", column="policy_id"),
            @Result(property="policyName", column="policy_name"),
            @Result(property="discount", column="discount")
    })
    Page<PolicyEntity> selectPolicyList(Page<?> page);
}